package org.giovanolli.mumi.view.converter;

import javax.faces.convert.FacesConverter;

import org.giovanolli.mumi.entities.Region;

@FacesConverter(value = "regionConverter")
public class RegionConverter extends SelectItemsBaseConverter<Region> {
	@Override
	public String getAsString(Object value) {
		return ((Region) value).getUid().toString();
	}

	@Override
	public String getItemLabel(Region object) {
		return object != null ? object.getName() : null;
	}

	@Override
	public Object getItemValue(Region object) {
		return object;
	}

}